﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace UAXInversionesWeb
{
    public partial class PrincipalCliente : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // en el caso de estar logueado, comprobamos que tenga permisos para acceder a ello
            if ((string)HttpContext.Current.Session["tipoUsuario"] != "cliente")
            {
                if ((string)HttpContext.Current.Session["tipoUsuario"] == "operario")
                {
                    Response.Redirect("../operario/PaginaPrincipalOperario.aspx");
                }
                else if ((string)HttpContext.Current.Session["tipoUsuario"] == "supervisor")
                {
                    Response.Redirect("../supervisor/PaginaPrincipalSupervisor.aspx");
                }
            }
        }

        public string mainTitle
        {
            set
            {
                PPCliente myMaster = (PPCliente)this.Master;
                myMaster.mainTitle = value;
            }
        }
    }
}
